import request from '@/utils/request.js'
//文章分类查询
export const articleCategoryListService = (params)=>{
    //携带分页参数
    return request.get('/category/findAll',{params:params})
}

//删除分类
export const deleteCategoryService = (id)=>{
    return request.delete('/category',{params:{id:id}});
}

// 添加分类
export const addCategoryService = (data)=>{ 
    return request.post('/category/add',{data:data});
}

// 修改分类
export const updateCategoryService = (data)=>{
    return request.patch('/category/update',data);
}

// 获取所有文章分类:用于文章管理界面查询功能
export const categoryListService = ()=>{
    return request.get('/category/findCategorys');
}